#include <iostream>
#include <string>

using namespace std;

int main(){
	string a;
	int n;
	cin >> a;
	for(int i = 0;i < a.length();i++){
		n += a[i];
		n -= 48;
	}
	cout << n;
}
